package com.fate.system.dto.user;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Size;
import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * @Author: ten.x @TableName sys_user @Date: 2024-08-09 02:11:25 @Version: V1.0
 */
@Data
@Accessors(chain = true)
@TableName(value = "sys_user")
@EqualsAndHashCode(callSuper = false)
public class UserAddDTO implements Serializable {

  @Serial
  @TableField(exist = false)
  private static final long serialVersionUID = 1L;

  /** 用户名 */
  @Size(max = 255, message = "编码长度不能超过255")
  @TableField(value = "username")
  @Schema(description = "用户名")
  @Length(max = 255, message = "编码长度不能超过255")
  private String username;

  /** 昵称 */
  @Size(max = 255, message = "编码长度不能超过255")
  @TableField(value = "nickname")
  @Schema(description = "昵称")
  @Length(max = 255, message = "编码长度不能超过255")
  private String nickname;

  /** 手机号 */
  @Size(max = 20, message = "编码长度不能超过20")
  @TableField(value = "phone")
  @Schema(description = "手机号")
  @Length(max = 20, message = "编码长度不能超过20")
  private String phone;

  /** 密码 */
  @Size(max = 255, message = "编码长度不能超过255")
  @TableField(value = "password")
  @Schema(description = "密码")
  @Length(max = 255, message = "编码长度不能超过255")
  private String password;

  /** 头像 */
  @Size(max = 255, message = "编码长度不能超过255")
  @TableField(value = "avatar")
  @Schema(description = "头像")
  @Length(max = 255, message = "编码长度不能超过255")
  private String avatar;

  /** 性别 字典：sex_type： 1男 2女 */
  @Size(max = 20, message = "编码长度不能超过20")
  @TableField(value = "sex")
  @Schema(description = "性别 字典：sex_type： 1男 2女")
  @Length(max = 20, message = "编码长度不能超过20")
  private String sex;

  /** 真实姓名 */
  @Size(max = 255, message = "编码长度不能超过255")
  @TableField(value = "real_name")
  @Schema(description = "真实姓名")
  @Length(max = 255, message = "编码长度不能超过255")
  private String realName;

  /** 电子邮件 */
  @Size(max = 255, message = "编码长度不能超过255")
  @TableField(value = "email")
  @Schema(description = "电子邮件")
  @Length(max = 255, message = "编码长度不能超过255")
  private String email;

  /** 身份证 */
  @Size(max = 255, message = "编码长度不能超过255")
  @TableField(value = "id_card")
  @Schema(description = "身份证")
  @Length(max = 255, message = "编码长度不能超过255")
  private String idCard;

  /** 生日 */
  @TableField(value = "birthday")
  @Schema(description = "生日")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  private LocalDate birthday;

  /** 个性签名 */
  @Size(max = 255, message = "编码长度不能超过255")
  @TableField(value = "personal_signature")
  @Schema(description = "个性签名")
  @Length(max = 255, message = "编码长度不能超过255")
  private String personalSignature;

  /** 角色id列表 */
  @TableField(value = "role_ids")
  @Schema(description = "角色id列表")
  private List<String> roleIds;

  /** 微信openid */
  @TableField(value = "wx_open_id")
  @Schema(description = "微信openid")
  private String wxOpenId;

  /** 地址 */
  @Size(max = 255, message = "编码长度不能超过255")
  @TableField(value = "address")
  @Schema(description = "地址")
  @Length(max = 255, message = "编码长度不能超过255")
  private String address;

  /** 经度 */
  @TableField(value = "longitude")
  @Schema(description = "经度")
  private Double longitude;

  /** 纬度 */
  @TableField(value = "latitude")
  @Schema(description = "纬度")
  private Double latitude;
}
